String clazzTpl({package}) => """
# 生成和优化代码
.PHONY: code
code:
	@echo "生成和优化代码，请等待..."
	@flutter pub get >/dev/null 2>&1
	@flutter pub upgrade >/dev/null 2>&1
	@flutter pub global activate intl_utils >/dev/null 2>&1
	@flutter pub global activate dart_style >/dev/null 2>&1
	@flutter pub global run intl_utils:generate >/dev/null 2>&1
	@flutter packages pub run build_runner clean >/dev/null 2>&1
	@flutter packages pub run build_runner build --delete-conflicting-outputs
	@flutter pub get >/dev/null 2>&1

# 默认UAT环境
.PHONY: run
run:
	@flutter run

# 发布Android上架包(arm拆分32位和64位,腾讯应用宝需要32位)
.PHONY: apk
apk:
	@flutter clean && flutter pub get
	@flutter build apk --release \\
	--dart-define=AppStore=true \\
	--target-platform=android-arm,android-arm64 \\
	--split-per-abi
	@open build/app/outputs/flutter-apk

# 发布iOS上架App Store(自动上传App Store)
.PHONY: ipa
ipa:
	@flutter clean && flutter pub get
	@flutter build ipa --release \\
	--dart-define=AppStore=true \\
	--export-method=app-store
	@xcrun altool --upload-app -t ios -f build/ios/ipa/*.ipa \\
	-u "xxxx.com" -p "xxxx"
""";
